﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:igCP="http://schemas.infragistics.com/xaml" xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives" xmlns:igPrimBase="http://schemas.infragistics.com/xaml/primitives" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" mc:Ignorable="d">

  <!-- *********************************  TEHEME COLORS  ********************************* -->
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Theme.Colors.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <!-- *********************************  COLOR PICKER (ONLY) COLORS  ********************************* -->
  <Color x:Key="Color_1001">#ff000000</Color>
  <Color x:Key="Color_1002">#FFD1D1D1</Color>
  <Color x:Key="Color_1003">#FFFFFF00</Color>
  <Color x:Key="Color_1004">#ff00ff00</Color>
  <Color x:Key="Color_1005">#FF008000</Color>
  <Color x:Key="Color_1006">#ff00ffff</Color>
  <Color x:Key="Color_1007">#ff0000ff</Color>
  <Color x:Key="Color_1008">#FFFF00FF</Color>
  <Color x:Key="Color_1009">#FFFF0000</Color>

  <!-- *********************************  BRUSHES  ********************************* -->
  <SolidColorBrush x:Key="ForegroundBrush" Color="{StaticResource Color_001}" />
  <SolidColorBrush x:Key="LightForegroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="TransparentBrush" Color="{StaticResource Color_016}" />
  <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="{StaticResource Color_012}" />
  <SolidColorBrush x:Key="LightBackgroundBrush" Color="{StaticResource Color_004}" />

  <!-- TextBox Brushes -->
  <SolidColorBrush x:Key="TextBoxBackgroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="TextBoxBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="TextBoxHoverBorderBrush" Color="{StaticResource Color_003}" />

  <!-- Slider Brushes -->
  <SolidColorBrush x:Key="SliderHTrackBackgroundBrush" Color="{StaticResource Color_1002}" />
  <SolidColorBrush x:Key="SliderHTrackBorderBrush" Color="{StaticResource Color_1002}" />
  <SolidColorBrush x:Key="SliderVTrackBackgroundBrush" Color="{StaticResource Color_1002}" />
  <SolidColorBrush x:Key="SliderVTrackBorderBrush" Color="{StaticResource Color_1002}" />
  <SolidColorBrush x:Key="SliderThumbBackgroundBrush" Color="{StaticResource Color_003}" />
  <SolidColorBrush x:Key="SliderThumbHoverBackgroundBrush" Color="{StaticResource Color_002}" />
  <SolidColorBrush x:Key="SliderThumbPressedBackgroundBrush" Color="{StaticResource Color_024}" />

  <!-- Button Brushes -->
  <SolidColorBrush x:Key="ButtonBackgroundBrush" Color="{StaticResource Color_008}" />
  <SolidColorBrush x:Key="ButtonBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="ButtonHoverBackgroundBrush" Color="{StaticResource Color_006}" />
  <SolidColorBrush x:Key="ButtonHoverBorderBrush" Color="{StaticResource Color_003}" />
  <SolidColorBrush x:Key="ButtonPressedBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ButtonPressedBorderBrush" Color="{StaticResource Color_024}" />

  <!-- ToggleButton -->
  <SolidColorBrush x:Key="ToggleButtonBackgroundBrush" Color="{StaticResource Color_008}" />
  <SolidColorBrush x:Key="ToggleButtonBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="ToggleButtonHoverBackgroundBrush" Color="{StaticResource Color_006}" />
  <SolidColorBrush x:Key="ToggleButtonHoverBorderBrush" Color="{StaticResource Color_003}" />
  <SolidColorBrush x:Key="ToggleButtonPressedBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ToggleButtonPressedBorderBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ToggleButtonGlyphBackgroundBrush" Color="{StaticResource Color_019}" />

  <!-- ColorModes Brushes -->
  <SolidColorBrush x:Key="ColorModeRadioButtonBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="ColorModeRadioButtonInnerBackgroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ColorModeRadioButtonInnerBorderBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ColorModeTabsBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ColorModeTabsBorderBrush" Color="{StaticResource Color_024}" />

  <!-- ColorPickerDialog Brushes -->
  <SolidColorBrush x:Key="ColorPickerDialogHeaderBackgroundBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ColorPickerDialogHeaderBorderBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ColorPickerDialogBackgroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ColorPickerDialogBorderBrush" Color="{StaticResource Color_004}" />

  <!-- TrackFill Brushes -->
  <SolidColorBrush x:Key="TrackFillBackgroundBrush" Color="{StaticResource Color_024}" />

  <!-- ColorItem Brushes -->
  <SolidColorBrush x:Key="ColorItemBoxBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="ColorItemBoxSelectedOuterBorderBrush" Color="{StaticResource Color_024}" />
  <SolidColorBrush x:Key="ColorItemBoxSelectedInnerBorderBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ColorItemBoxHoverOuterBorderBrush" Color="{StaticResource Color_002}" />
  <SolidColorBrush x:Key="ColorItemBoxHoverInnerBorderBrush" Color="{StaticResource Color_008}" />

  <!-- AdvancedColorShadePicker Brushes -->
  <SolidColorBrush x:Key="AdvancedColorShadePickerBackgroundBrush" Color="{StaticResource Color_009}" />
  <LinearGradientBrush x:Key="AdvancedColorShadePickerWhiteBackgroundBrush" StartPoint="0,0" EndPoint="1,0">
    <GradientStop Offset="0" Color="{StaticResource Color_009}" />
    <GradientStop Offset="1" Color="{StaticResource Color_016}" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="AdvancedColorShadePickerBlackBackgroundBrush" StartPoint="0,1" EndPoint="0, 0">
    <GradientStop Offset="0" Color="{StaticResource Color_1001}" />
    <GradientStop Offset="1" Color="{StaticResource Color_021}" />
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="AdvancedColorShadePickerHueBackgroundBrush" StartPoint="0,0" EndPoint="0,1" igPrim:XamlHelper.IsExcludedFromWash="True">
    <GradientStop Offset="0.00" Color="{StaticResource Color_1009}" />
    <GradientStop Offset="0.17" Color="{StaticResource Color_1003}" />
    <GradientStop Offset="0.33" Color="{StaticResource Color_1004}" />
    <GradientStop Offset="0.50" Color="{StaticResource Color_1006}" />
    <GradientStop Offset="0.66" Color="{StaticResource Color_1007}" />
    <GradientStop Offset="0.83" Color="{StaticResource Color_1008}" />
    <GradientStop Offset="1.00" Color="{StaticResource Color_1009}" />
  </LinearGradientBrush>
  <SolidColorBrush x:Key="AdvancedColorShadePickerColorSamplingBackgroundBrush" Color="{StaticResource Color_1009}" />
  <SolidColorBrush x:Key="AdvancedColorShadePickerCurrentColorBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="AdvancedColorShadePickerHueRectangleBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="AdvancedColorShadePickerShadingCanvasBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="RedSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1009}" igPrim:XamlHelper.IsExcludedFromWash="True" />
  <SolidColorBrush x:Key="GreenSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1005}" igPrim:XamlHelper.IsExcludedFromWash="True" />
  <SolidColorBrush x:Key="BlueSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1007}" igPrim:XamlHelper.IsExcludedFromWash="True" />
  <SolidColorBrush x:Key="CyanSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1006}" igPrim:XamlHelper.IsExcludedFromWash="True" />
  <SolidColorBrush x:Key="MagentaSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1008}" igPrim:XamlHelper.IsExcludedFromWash="True" />
  <SolidColorBrush x:Key="YellowSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1003}" igPrim:XamlHelper.IsExcludedFromWash="True" />
  <SolidColorBrush x:Key="BlackSliderTrackFillBackgroundBrush" Color="{StaticResource Color_1001}" igPrim:XamlHelper.IsExcludedFromWash="True" />

  <!-- ColorPicker Brushes -->
  <SolidColorBrush x:Key="ColorPickerBorderBrush" Color="{StaticResource Color_004}" />
  <SolidColorBrush x:Key="ColorPickerBackgroundBrush" Color="{StaticResource Color_009}" />
  <SolidColorBrush x:Key="ColorPickerGlyphBackgroundBrush" Color="{StaticResource Color_019}" />
  <SolidColorBrush x:Key="ColorPickerSelectedColorRectangleBorderBrush" Color="{StaticResource Color_004}" />

  <!-- *********************************  TextBlock Style  ********************************* -->
  <Style x:Key="TextBlockStyle" TargetType="TextBlock">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="FontSize" Value="14" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="Margin" Value="0,0,0,-3" />
  </Style>

  <!-- *********************************  TextBox Style  ********************************* -->
  <Style x:Key="TextBoxStyle" TargetType="TextBox">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="Background" Value="{StaticResource TextBoxBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
    <Setter Property="MinHeight" Value="28" />
    <Setter Property="Padding" Value="2" />
  </Style>

  <!-- *********************************  TrackFill Style  ********************************* -->
  <Style x:Key="TrackFillStyle" TargetType="igPrimBase:TrackFill">
    <Setter Property="Background" Value="{StaticResource TrackFillBackgroundBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrimBase:TrackFill">
          <Rectangle Height="6" Fill="{TemplateBinding Background}" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ButtonStyle  ********************************* -->
  <Style x:Key="ButtonStyle" TargetType="Button">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="FontFamily" Value="Segoe UI" />
    <Setter Property="Padding" Value="10,0,10,2" />
    <Setter Property="MinHeight" Value="30" />
    <Setter Property="MinWidth" Value="30" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonHoverBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="Stroke">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentControl">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DisabledVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedVisualElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="Bd" Fill="{StaticResource ButtonBackgroundBrush}" Stroke="{StaticResource ButtonBorderBrush}" StrokeThickness="1" />
            <ContentControl x:Name="ContentControl" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
              <ContentPresenter x:Name="contentPresenter" />
            </ContentControl>
            <Rectangle x:Name="FocusedVisualElement" Stroke="{StaticResource ButtonPressedBorderBrush}" Visibility="Collapsed" StrokeThickness="2" />
            <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledBackgroundBrush}" Visibility="Collapsed" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ByteSlider Style  ********************************* -->
  <Style x:Key="ByteSliderStyle" TargetType="igPrimBase:ByteSlider">
    <Setter Property="Margin" Value="8 0 8 0" />
    <Setter Property="Orientation" Value="Horizontal" />
    <Setter Property="IsMouseWheelEnabled" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrimBase:ByteSlider">
          <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="OrientationStates">
                <VisualState x:Name="Horizontal" />
                <VisualState x:Name="Vertical">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSlider" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSlider" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="HorizontalSlider">
              <Grid x:Name="HorizontalTickMarks" Grid.Column="1" Background="{StaticResource TransparentBrush}" />
              <Grid x:Name="HorizontalTrack" Height="16" Grid.Column="1" Background="{StaticResource TransparentBrush}">
                <Border Height="6" Background="{StaticResource SliderHTrackBackgroundBrush}" BorderBrush="{StaticResource SliderHTrackBorderBrush}" BorderThickness="1" CornerRadius="0" Margin="-7,0" />
                <Canvas x:Name="HorizontalTrackFills" Margin="-7,0" />
                <Canvas x:Name="HorizontalThumbs" />
              </Grid>
            </Grid>
            <Grid x:Name="VerticalSlider" Visibility="Collapsed">
              <Grid x:Name="VerticalSlidersGrid" Grid.Row="1" Margin="0,5,0,5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="Auto" />
                  <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
              </Grid>
              <Grid x:Name="VerticalTickMarks" Grid.Row="1" Background="{StaticResource TransparentBrush}" />
              <Grid x:Name="VerticalTrack" Width="16" Grid.Row="1" Background="{StaticResource TransparentBrush}">
                <Border Width="6" Background="{StaticResource SliderVTrackBackgroundBrush}" BorderBrush="{StaticResource SliderVTrackBorderBrush}" BorderThickness="1,1,1,1" />
                <Canvas x:Name="VerticalTrackFills" />
                <Canvas x:Name="VerticalThumbs" />
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  NumericSlider Style  ********************************* -->
  <Style x:Key="NumericSliderStyle" TargetType="ig:XamSliderBase">
    <Setter Property="Margin" Value="8 0 8 0" />
    <Setter Property="Orientation" Value="Horizontal" />
    <Setter Property="IsMouseWheelEnabled" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ig:XamSliderBase">
          <Grid x:Name="RootElement" Background="{TemplateBinding Background}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="OrientationStates">
                <VisualState x:Name="Horizontal" />
                <VisualState x:Name="Vertical">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalSlider" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalSlider" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="HorizontalSlider">
              <Grid x:Name="HorizontalTickMarks" Grid.Column="1" Background="{StaticResource TransparentBrush}" />
              <Grid x:Name="HorizontalTrack" Height="16" Grid.Column="1" Background="{StaticResource TransparentBrush}">
                <Border Height="6" Background="{StaticResource SliderHTrackBackgroundBrush}" BorderBrush="{StaticResource SliderHTrackBorderBrush}" BorderThickness="1" CornerRadius="0" Margin="-7,0" />
                <Canvas x:Name="HorizontalTrackFills" Margin="-7,0" />
                <Canvas x:Name="HorizontalThumbs" />
              </Grid>
            </Grid>
            <Grid x:Name="VerticalSlider" Visibility="Collapsed">
              <Grid x:Name="VerticalSlidersGrid" Grid.Row="1" Margin="0,5,0,5">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                  <ColumnDefinition Width="Auto" />
                  <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
              </Grid>
              <Grid x:Name="VerticalTickMarks" Grid.Row="1" Background="{StaticResource TransparentBrush}" />
              <Grid x:Name="VerticalTrack" Width="16" Grid.Row="1" Background="{StaticResource TransparentBrush}">
                <Border Width="6" Background="{StaticResource SliderVTrackBackgroundBrush}" BorderBrush="{StaticResource SliderVTrackBorderBrush}" BorderThickness="1,1,1,1" />
                <Canvas x:Name="VerticalTrackFills" />
                <Canvas x:Name="VerticalThumbs" />
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  SliderThumb Style  ********************************* -->
  <Style x:Key="SliderThumbStyle" TargetType="ig:XamSliderThumbBase">
    <Setter Property="Height" Value="16" />
    <Setter Property="Width" Value="16" />
    <Setter Property="Cursor" Value="Hand" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ig:XamSliderThumbBase">
          <Grid x:Name="RootElement">
            <ToolTipService.ToolTip>
              <ToolTip x:Name="ThumbToolTip" ContentTemplate="{TemplateBinding ToolTipTemplate}" Visibility="{TemplateBinding ToolTipVisibility}" />
            </ToolTipService.ToolTip>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="OrientationStates">
                <VisualState x:Name="Horizontal" />
                <VisualState x:Name="Vertical">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="Thumb">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SliderThumbPressedBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ActiveStates">
                <VisualState x:Name="Inactive" />
                <VisualState x:Name="Active" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="HoverStates">
                <VisualState x:Name="Hover">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="Thumb">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SliderThumbHoverBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="NoHover" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="HorizontalThumb" HorizontalAlignment="Left" Margin="-8,0,0,0">
              <Rectangle Fill="{StaticResource TransparentBrush}" Margin="-10" />
              <Ellipse x:Name="Thumb" Width="16" Height="16" Fill="{StaticResource SliderThumbBackgroundBrush}" />
            </Grid>
            <Grid x:Name="VerticalThumb" Visibility="Collapsed" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  XamColorPickerToggleButton Style  ********************************* -->
  <Style x:Key="XamColorPickerToggleButtonStyle" TargetType="ToggleButton">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="Padding" Value="5" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="MinHeight" Value="28" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToggleButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="hoverElem" Storyboard.TargetProperty="(UIElement.Opacity)" To="1" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxHoverBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)" To="0.35" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="pressedElem" Storyboard.TargetProperty="(UIElement.Opacity)" To="1" />
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Fill" Storyboard.TargetName="Arrow">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightForegroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Indeterminate" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused" />
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*" />
              <ColumnDefinition Width="30" />
            </Grid.ColumnDefinitions>
            <igPrim:TransparencyBackgroundControl Grid.ColumnSpan="2" />
            <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}" />
            <Border x:Name="Bd" Grid.Column="1" Background="{StaticResource ToggleButtonBackgroundBrush}" BorderBrush="{StaticResource ToggleButtonBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
            <Border x:Name="Border" BorderBrush="{StaticResource ToggleButtonBorderBrush}" BorderThickness="1,1,0,1" />
            <Rectangle x:Name="hoverElem" Grid.Column="1" Fill="{StaticResource ToggleButtonHoverBackgroundBrush}" Opacity="0" Stroke="{StaticResource ToggleButtonHoverBorderBrush}" />
            <Rectangle x:Name="pressedElem" Grid.Column="1" Fill="{StaticResource ToggleButtonPressedBackgroundBrush}" Opacity="0" Stroke="{StaticResource ToggleButtonPressedBorderBrush}" />
            <Path x:Name="Arrow" Data="M5,6 C5,6 10,0 10,0 C10,0 0,0 0,0 C0,0 5,6 5,6 z" Grid.Column="1" Fill="{StaticResource ToggleButtonGlyphBackgroundBrush}" Stretch="Fill" UseLayoutRounding="False" Width="10" Height="6" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  XamColorPicker Style  ********************************* -->
  <Style TargetType="igCP:XamColorPicker">
    <Setter Property="Padding" Value="4,2" />
    <Setter Property="MinHeight" Value="28" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Background" Value="{StaticResource ColorPickerBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorPickerBorderBrush}" />
    <Setter Property="DerivedPaletteColorItemBoxStyle">
      <Setter.Value>
        <Style TargetType="igPrimBase:ColorItemBox">
          <Setter Property="Foreground" Value="{StaticResource TransparentBrush}" />
          <Setter Property="BorderThickness" Value="0" />
          <Setter Property="Width" Value="19" />
          <Setter Property="Height" Value="19" />
          <Setter Property="Margin" Value="2,0" />
          <Setter Property="Template">
            <Setter.Value>
              <ControlTemplate TargetType="igPrimBase:ColorItemBox">
                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                  <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="SelectedStates">
                      <VisualState x:Name="Normal" />
                      <VisualState x:Name="WasSelected">
                        <Storyboard>
                          <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder1" Storyboard.TargetProperty="BorderBrush">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxSelectedOuterBorderBrush}">
                            </DiscreteObjectKeyFrame>
                          </ObjectAnimationUsingKeyFrames>
                          <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder2" Storyboard.TargetProperty="BorderBrush">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxSelectedInnerBorderBrush}">
                            </DiscreteObjectKeyFrame>
                          </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                      </VisualState>
                      <VisualState x:Name="Hover">
                        <Storyboard>
                          <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder1" Storyboard.TargetProperty="BorderBrush">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxHoverOuterBorderBrush}">
                            </DiscreteObjectKeyFrame>
                          </ObjectAnimationUsingKeyFrames>
                          <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder2" Storyboard.TargetProperty="BorderBrush">
                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxHoverInnerBorderBrush}">
                            </DiscreteObjectKeyFrame>
                          </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                      </VisualState>
                    </VisualStateGroup>
                  </VisualStateManager.VisualStateGroups>
                  <Grid>
                    <Rectangle Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Margin="0" Fill="{TemplateBinding ColorItemBrush}" />
                    <Border x:Name="SelectedBorder1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource TransparentBrush}" BorderBrush="{StaticResource TransparentBrush}" BorderThickness="1">
                      <Border x:Name="SelectedBorder2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource TransparentBrush}" BorderBrush="{StaticResource TransparentBrush}" BorderThickness="1" />
                    </Border>
                  </Grid>
                </Border>
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igCP:XamColorPicker">
          <Grid x:Name="Root">
            <Grid.Resources>
              <igPrimBase:ColorStripManager x:Key="StripManager" />
              <igPrimBase:NullableColorConverter x:Key="ColorConverter" />
            </Grid.Resources>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="DropDownStates">
                <VisualState x:Name="Closed" />
                <VisualState x:Name="Open">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Popup" Storyboard.TargetProperty="IsOpen">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <System:Boolean>True</System:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DisplayColorPalettesDropdownButton">
                <VisualState x:Name="Hide" />
                <VisualState x:Name="Show">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ColorPalettesButton" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ColorPalettes" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ShowAdvancedEditorButton">
                <VisualState x:Name="ShowEditorButton" />
                <VisualState x:Name="HideEditorButton">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AdvancedEditorButton" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ShowRecentColorPalette">
                <VisualState x:Name="ShowRCPalette" />
                <VisualState x:Name="HideRCPalette">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RecentColorCaption" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RecentColorStrip" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ShowDPalettes">
                <VisualState x:Name="ShowDerivedPalettes" />
                <VisualState x:Name="HideDerivedPalettes">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DerivedColorCaption" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DerivedPalettes" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="ContentPresenterBorder">
              <Grid>
                <igPrimBase:ColorPickerDialog x:Name="ColorPickerDialog" ColorPicker="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
                <ToggleButton x:Name="ToggleButton" Grid.Column="1" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource XamColorPickerToggleButtonStyle}">
                  <ToggleButton.Background>
                    <SolidColorBrush Color="{Binding SelectedColor, Converter={StaticResource ColorConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                  </ToggleButton.Background>
                </ToggleButton>
              </Grid>
            </Border>
            <Popup x:Name="Popup" VerticalAlignment="Bottom" ig:Commanding.CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" IsOpen="False">
              <Border x:Name="RootPopupElement" Background="{StaticResource ColorPickerBackgroundBrush}" BorderBrush="{StaticResource ColorPickerBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="10">
                <StackPanel Orientation="Vertical" Margin="5,0">
                  <TextBlock Text="{TemplateBinding CurrentColorCaption}" Style="{StaticResource TextBlockStyle}" Margin="0,0,0,8" />
                  <Grid Height="30">
                    <igPrim:TransparencyBackgroundControl />
                    <Rectangle x:Name="SelectedColorRectangle" Stroke="{StaticResource ColorPickerSelectedColorRectangleBorderBrush}">
                      <Rectangle.Fill>
                        <SolidColorBrush Color="{Binding SelectedColorPreview, Converter={StaticResource ColorConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                      </Rectangle.Fill>
                    </Rectangle>
                  </Grid>
                  <TextBlock Margin="0,12,0,8" Text="{TemplateBinding CurrentPaletteCaption}" Style="{StaticResource TextBlockStyle}" />
                  <Grid>
                    <ComboBox x:Name="ColorPalettes" Height="25" Grid.Column="1" ItemsSource="{Binding ColorPalettes, RelativeSource={RelativeSource TemplatedParent}}" Opacity="0" SelectedItem="{Binding CurrentPalette, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed">
                      <ComboBox.ItemTemplate>
                        <DataTemplate>
                          <igPrimBase:ColorStrip ColorPalette="{Binding}" IsHitTestVisible="False" />
                        </DataTemplate>
                      </ComboBox.ItemTemplate>
                    </ComboBox>
                    <Grid>
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition x:Name="colorStrip" Width="*" />
                        <ColumnDefinition x:Name="ColorPalettesBtn" Width="Auto" />
                      </Grid.ColumnDefinitions>
                      <Button x:Name="ColorPalettesButton" Grid.Column="1" Margin="4,8,0,0" Cursor="Hand" HorizontalContentAlignment="Center" Padding="1" Style="{StaticResource ButtonStyle}" VerticalContentAlignment="Center" Visibility="Collapsed">
                        <Path x:Name="Arrow" Data="M5,6 C5,6 10,0 10,0 C10,0 0,0 0,0 C0,0 5,6 5,6 z" Grid.Column="1" Fill="{StaticResource ColorPickerGlyphBackgroundBrush}" Stretch="Fill" UseLayoutRounding="False" Width="10" Height="6" />
                      </Button>
                      <igPrimBase:ColorStrip x:Name="CurrentColorStrip" ColorPalette="{Binding CurrentPalette, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" igPrimBase:ColorStripManager.Manager="{StaticResource StripManager}" Margin="0,0,0,-9" />
                    </Grid>
                  </Grid>
                  <TextBlock x:Name="DerivedColorCaption" Margin="0,22,0,8" Text="{TemplateBinding DerivedColorPalettesCaption}" Style="{StaticResource TextBlockStyle}" />
                  <StackPanel x:Name="DerivedPalettes" Orientation="Vertical" />
                  <TextBlock x:Name="RecentColorCaption" Margin="0,12,0,8" Text="{TemplateBinding RecentColorPaletteCaption}" Style="{StaticResource TextBlockStyle}" />
                  <igPrimBase:ColorStrip x:Name="RecentColorStrip" igPrimBase:ColorStripManager.Manager="{StaticResource StripManager}" />
                  <Border Height="2" Margin="0,10" Background="{StaticResource LightBackgroundBrush}" BorderBrush="{StaticResource LightForegroundBrush}" BorderThickness="0,0,0,1" />
                  <Button x:Name="AdvancedEditorButton" Content="{TemplateBinding AdvancedButtonCaption}" Style="{StaticResource ButtonStyle}" Margin="0,0,0,5">
                    <ig:Commanding.Commands>
                      <ig:CommandSourceCollection>
                        <igCP:XamPickerCommandSource CommandType="Toggle" EventName="Click" />
                        <igCP:XamPickerCommandSource CommandType="OpenAdvanceEditor" EventName="Click" />
                      </ig:CommandSourceCollection>
                    </ig:Commanding.Commands>
                  </Button>
                </StackPanel>
              </Border>
            </Popup>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ColorStrip Style  ********************************* -->
  <Style x:Key="ColorStripStyle" TargetType="igPrimBase:ColorStrip">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrimBase:ColorStrip">
          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <StackPanel x:Name="ColorPickerPanel" Background="{TemplateBinding Background}" Orientation="Horizontal" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igPrimBase:ColorStrip" BasedOn="{StaticResource ColorStripStyle}" />

  <!-- *********************************  ColorItemBox Style  ********************************* -->
  <Style x:Key="ColorItemBoxStyle" TargetType="igPrimBase:ColorItemBox">
    <Setter Property="Foreground" Value="{StaticResource TransparentBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorItemBoxBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Width" Value="19" />
    <Setter Property="Height" Value="19" />
    <Setter Property="Margin" Value="2,0" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrimBase:ColorItemBox">
          <Border>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectedStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="WasSelected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder1" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxSelectedOuterBorderBrush}">
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder2" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxSelectedInnerBorderBrush}">
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Hover">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder1" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxHoverOuterBorderBrush}">
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="SelectedBorder2" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ColorItemBoxHoverInnerBorderBrush}">
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid>
              <Rectangle Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Margin="0" Fill="{TemplateBinding ColorItemBrush}" />
              <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
              <Border x:Name="SelectedBorder1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource TransparentBrush}" BorderBrush="{StaticResource TransparentBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Border x:Name="SelectedBorder2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource TransparentBrush}" BorderBrush="{StaticResource TransparentBrush}" BorderThickness="1" />
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igPrimBase:ColorItemBox" BasedOn="{StaticResource ColorItemBoxStyle}" />

  <!-- *********************************  ColorModeRadioButton Style  ********************************* -->
  <Style x:Key="ColorModeRadioButtonStyle" TargetType="RadioButton">
    <Setter Property="Background" Value="{StaticResource TransparentBrush}" />
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
    <Setter Property="FontSize" Value="14.667" />
    <Setter Property="FontFamily" Value="Segoe UI Semibold" />
    <Setter Property="Height" Value="26" />
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="BorderThickness" Value="1,1,1,0" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorModeRadioButtonBorderBrush}" />
    <Setter Property="Padding" Value="15,2" />
    <Setter Property="Margin" Value="0" />
    <Setter Property="Cursor" Value="Hand" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RadioButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentControl" d:IsOptimized="True" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)" To=".55" />
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="border">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentControl1">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Indeterminate" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused" />
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="ValidationStates">
                <VisualState x:Name="Valid" />
                <VisualState x:Name="InvalidUnfocused" />
                <VisualState x:Name="InvalidFocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle Fill="{StaticResource TransparentBrush}" />
            <Border x:Name="border" Grid.ColumnSpan="2" Margin="0" BorderBrush="{StaticResource ColorModeRadioButtonInnerBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ColorModeRadioButtonInnerBackgroundBrush}" Visibility="Collapsed" />
            <ContentControl x:Name="contentControl" Opacity="0.7" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{StaticResource LightForegroundBrush}">
              <ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
            </ContentControl>
            <ContentControl x:Name="contentControl1" Visibility="Collapsed" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{StaticResource ForegroundBrush}">
              <ContentPresenter x:Name="contentPresenter1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
            </ContentControl>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  AdvancedColorShadePicker Style  ********************************* -->
  <Style x:Key="AdvancedColorShadePickerStyle" TargetType="igPrimBase:AdvancedColorShadePicker">
    <Setter Property="Background" Value="{StaticResource LightForegroundBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrim:AdvancedColorShadePicker">
          <Grid Background="{StaticResource AdvancedColorShadePickerBackgroundBrush}">
            <Grid.Resources>
              <igPrim:SpecializedTextBoxValueConverter x:Key="TextConverter"></igPrim:SpecializedTextBoxValueConverter>
            </Grid.Resources>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="ColorSliders">
                <VisualState x:Name="RGB">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="RGBSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="HSLSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="CMYKSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="HSL">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="RGBSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="HSLSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="CMYKSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="CMYK">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="RGBSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="HSLSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="CMYKSliders" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="00:00:00">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition x:Name="colorModeRow" />
              <RowDefinition x:Name="samplingRow" />
              <RowDefinition x:Name="colorSliderRow" Height="176" />
              <RowDefinition x:Name="alphaRow" />
              <RowDefinition x:Name="buttonsRow" />
            </Grid.RowDefinitions>
            <Grid x:Name="colorModes" Margin="0,0,0,5" Height="32">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
              </Grid.ColumnDefinitions>
              <Rectangle x:Name="colorModesBackground" Grid.ColumnSpan="5" Fill="{StaticResource ColorModeTabsBackgroundBrush}" Stroke="{StaticResource ColorModeTabsBorderBrush}" />
              <Rectangle Height="1" Grid.ColumnSpan="5" VerticalAlignment="Bottom" Fill="{StaticResource LightBackgroundBrush}" />
              <RadioButton Grid.Column="1" Content="RGB" GroupName="modes" IsChecked="True" Style="{StaticResource ColorModeRadioButtonStyle}" VerticalAlignment="Bottom">
                <ig:Commanding.Command>
                  <igCP:ColorStripsCommandSource CommandType="ShowRGBSliders" EventName="Click" />
                </ig:Commanding.Command>
              </RadioButton>
              <RadioButton Grid.Column="2" Content="HSL" GroupName="modes" Style="{StaticResource ColorModeRadioButtonStyle}" VerticalAlignment="Bottom">
                <ig:Commanding.Command>
                  <igCP:ColorStripsCommandSource CommandType="ShowHSLSliders" EventName="Click" />
                </ig:Commanding.Command>
              </RadioButton>
              <RadioButton Grid.Column="3" Content="CMYK" GroupName="modes" Style="{StaticResource ColorModeRadioButtonStyle}" VerticalAlignment="Bottom">
                <ig:Commanding.Command>
                  <igCP:ColorStripsCommandSource CommandType="ShowCMYKSliders" EventName="Click" />
                </ig:Commanding.Command>
              </RadioButton>
            </Grid>
            <Grid x:Name="samplingArea" Grid.Row="1" Margin="15,10">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="185" />
                <ColumnDefinition x:Name="spacerColumn" Width="5" />
                <ColumnDefinition Width="20" />
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition x:Name="shadingCanvasRow" Height="*" />
                <RowDefinition x:Name="currentColorRow" Height="20" />
              </Grid.RowDefinitions>
              <!-- SHADING CANVAS -->
              <Border BorderBrush="{StaticResource AdvancedColorShadePickerShadingCanvasBorderBrush}" BorderThickness="1,1,1,0" />
              <Canvas x:Name="ShadingCanvas" Width="183" Height="90">
                <Rectangle x:Name="ColorSamplingRectangle" Width="{Binding Width, ElementName=ShadingCanvas}" Height="{Binding Height, ElementName=ShadingCanvas}" Fill="{StaticResource AdvancedColorShadePickerColorSamplingBackgroundBrush}" Margin="0,1,0,0" />
                <Rectangle x:Name="rectWhiteGradient" Width="{Binding Width, ElementName=ShadingCanvas}" Height="{Binding Height, ElementName=ShadingCanvas}" Fill="{StaticResource AdvancedColorShadePickerWhiteBackgroundBrush}" Margin="0,1,0,0" />
                <Rectangle x:Name="rectBlackGradient" Width="{Binding Width, ElementName=ShadingCanvas}" Height="{Binding Height, ElementName=ShadingCanvas}" Fill="{StaticResource AdvancedColorShadePickerBlackBackgroundBrush}" Margin="0,1,0,0" />
                <Canvas x:Name="LightnessSelector" Width="10" Height="10" Canvas.Left="100" Canvas.Top="96" IsHitTestVisible="False">
                  <Ellipse Width="10" Height="10" IsHitTestVisible="False" Stroke="{StaticResource LightForegroundBrush}" StrokeThickness="3" />
                  <Ellipse Width="10" Height="10" IsHitTestVisible="False" Stroke="{StaticResource ForegroundBrush}" StrokeThickness="1" />
                </Canvas>
              </Canvas>
              <!-- PREVIOUS AND CURRENT COLOR -->
              <Border x:Name="currentColor" Grid.Row="1" BorderBrush="{StaticResource AdvancedColorShadePickerCurrentColorBorderBrush}" BorderThickness="1,0,1,1">
                <Grid>
                  <Grid.Resources>
                    <igPrimBase:NullableColorConverter x:Key="ColorConverter" />
                  </Grid.Resources>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
                  <igPrim:TransparencyBackgroundControl Grid.ColumnSpan="2" />
                  <Rectangle>
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding SelectedColor, Converter={StaticResource ColorConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Rectangle.Fill>
                  </Rectangle>
                  <Rectangle Grid.Column="1">
                    <Rectangle.Fill>
                      <SolidColorBrush Color="{Binding CurrentColor, Converter={StaticResource ColorConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Rectangle.Fill>
                  </Rectangle>
                </Grid>
              </Border>
              <!-- HUE CANVAS -->
              <Canvas x:Name="HueCanvas" Grid.Column="2" Grid.RowSpan="2">
                <Rectangle x:Name="HueRectangle" Width="20" Height="110" HorizontalAlignment="Right" Stroke="{StaticResource AdvancedColorShadePickerHueRectangleBorderBrush}" Fill="{StaticResource AdvancedColorShadePickerHueBackgroundBrush}" />
                <Canvas x:Name="HueSelector" Height="8" Canvas.Left="0" IsHitTestVisible="False">
                  <Path Width="5" Height="8" Data="F1 M 276.761,316L 262.619,307.835L 262.619,324.165L 276.761,316 Z " Fill="{StaticResource ForegroundBrush}" Stretch="Fill" Stroke="{StaticResource ForegroundBrush}" StrokeLineJoin="Round" />
                  <Path Width="5" Height="8" Canvas.Left="20" Canvas.Top="8" Data="F1 M 276.761,316L 262.619,307.835L 262.619,324.165L 276.761,316 Z " Fill="{StaticResource ForegroundBrush}" Stretch="Fill" Stroke="{StaticResource ForegroundBrush}" StrokeLineJoin="Round">
                    <Path.RenderTransform>
                      <RotateTransform Angle="180" />
                    </Path.RenderTransform>
                  </Path>
                </Canvas>
              </Canvas>
            </Grid>
            <!-- RGB SLIDERS-->
            <Border x:Name="RGBSliders" Grid.Row="2" Margin="15,0">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="44"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{TemplateBinding RedCaption}" Grid.Row="0" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <igPrimBase:ByteSlider x:Name="Red" Style="{StaticResource ByteSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource RedSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding Red, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="RedTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=Red, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
                <TextBlock Text="{TemplateBinding GreenCaption}" Grid.Row="2" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="3">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <igPrimBase:ByteSlider x:Name="Green" Style="{StaticResource ByteSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource GreenSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding Green, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="GreenTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=Green, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
                <TextBlock Text="{TemplateBinding BlueCaption}" Grid.Row="4" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="5">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <igPrimBase:ByteSlider x:Name="Blue" Style="{StaticResource ByteSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource BlueSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding Blue, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="BlueTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=Blue, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
              </Grid>
            </Border>
            <!-- HSL SLIDERS-->
            <Border x:Name="HSLSliders" Grid.Row="2" Margin="15,0" Visibility="Collapsed">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="44"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{TemplateBinding HueCaption}" Grid.Row="0" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="Hue" MaxValue="360.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" Value="{Binding H, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" TrackFillStyle="{StaticResource TrackFillStyle}" />
                  <TextBox x:Name="HTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=H, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
                <TextBlock Text="{TemplateBinding SaturationCaption}" Grid.Row="2" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="3">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="Saturation" MaxValue="100.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding S, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="STextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=S, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
                <TextBlock Text="{TemplateBinding LightnessCaption}" Grid.Row="4" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="5">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="Lightness" MaxValue="100.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding L, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="LTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=L, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
              </Grid>
            </Border>
            <!-- CMYK SLIDERS-->
            <Border x:Name="CMYKSliders" Grid.Row="2" Margin="15,0" Visibility="Collapsed">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                  <RowDefinition Height="Auto"></RowDefinition>
                  <RowDefinition Height="28"></RowDefinition>
                </Grid.RowDefinitions>
                <TextBlock Text="{TemplateBinding CyanCaption}" Grid.Row="0" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="C" MaxValue="100.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource CyanSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding C, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="CTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=C, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
                </Grid>

                <TextBlock Text="{TemplateBinding MagentaCaption}" Grid.Row="2" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="3">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="M" MaxValue="100.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource MagentaSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding M, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="MTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=M, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
                </Grid>

                <TextBlock Text="{TemplateBinding YellowCaption}" Grid.Row="4" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="5">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="Y" MaxValue="100.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource YellowSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding Y, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="YTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=Y, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" />
                </Grid>

                <TextBlock Text="{TemplateBinding BlackCaption}" Grid.Row="6" Style="{StaticResource TextBlockStyle}" />
                <Grid Grid.Row="7">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <ig:XamNumericSlider x:Name="K" MaxValue="100.0" MinValue="0.0" Style="{StaticResource NumericSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillBrush="{StaticResource BlackSliderTrackFillBackgroundBrush}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding K, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="KTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=K, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource TextConverter}, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
                </Grid>
              </Grid>
            </Border>
            <!-- ALPHA SLIDER -->
            <Border x:Name="alphaSlider" Grid.Row="3" Margin="15,0,15,0">
              <StackPanel>
                <TextBlock Text="{TemplateBinding AlphaCaption}" Style="{StaticResource TextBlockStyle}" />
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="15" />
                    <ColumnDefinition Width="60" />
                  </Grid.ColumnDefinitions>
                  <igPrimBase:ByteSlider x:Name="Alpha" Style="{StaticResource ByteSliderStyle}" ThumbStyle="{StaticResource SliderThumbStyle}" TrackFillStyle="{StaticResource TrackFillStyle}" Value="{Binding Alpha, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  <TextBox x:Name="AlphaTextBox" Style="{StaticResource TextBoxStyle}" Grid.Column="2" Text="{Binding Path=Alpha, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True }" VerticalAlignment="Center" />
                </Grid>
              </StackPanel>
            </Border>

            <Grid Grid.Row="4" Margin="15,5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="10" />
                <ColumnDefinition />
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
              </Grid.RowDefinitions>
              <Border Height="2" Grid.ColumnSpan="3" Margin="0,0,0,8" VerticalAlignment="Top" Background="{StaticResource LightBackgroundBrush}" BorderBrush="{StaticResource LightForegroundBrush}" BorderThickness="0,0,0,1" />
              <Button Grid.Row="1" Content="{TemplateBinding OKCaption}" Style="{StaticResource ButtonStyle}">

                <ig:Commanding.Commands>
                  <ig:CommandSourceCollection>
                    <igCP:ColorStripsCommandSource CommandType="Accept" EventName="Click" />
                    <igCP:ColorPickerDialogCommandSource CommandType="Close" EventName="Click" />
                  </ig:CommandSourceCollection>
                </ig:Commanding.Commands>
              </Button>
              <Button Grid.Column="2" Grid.Row="1" Content="{TemplateBinding CancelCaption}" Style="{StaticResource ButtonStyle}">

                <ig:Commanding.Commands>
                  <ig:CommandSourceCollection>
                    <igCP:ColorStripsCommandSource CommandType="Cancel" EventName="Click" />
                    <igCP:ColorPickerDialogCommandSource CommandType="Close" EventName="Click" />
                  </ig:CommandSourceCollection>
                </ig:Commanding.Commands>
              </Button>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igPrimBase:AdvancedColorShadePicker" BasedOn="{StaticResource AdvancedColorShadePickerStyle}" />

  <!-- *********************************  ColorPickerDialog Style  ********************************* -->
  <Style x:Key="ColorPickerDialogStyle" TargetType="igPrimBase:ColorPickerDialog">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Background" Value="{StaticResource ColorPickerDialogBackgroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource ColorPickerDialogBorderBrush}" />
    <Setter Property="Padding" Value="0,0,0,10" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrimBase:ColorPickerDialog">
          <Grid>
            <Popup x:Name="Popup">
              <Border x:Name="RootElement" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="25" />
                    <RowDefinition />
                  </Grid.RowDefinitions>
                  <Border Background="{StaticResource ColorPickerDialogHeaderBackgroundBrush}" BorderBrush="{StaticResource ColorPickerDialogHeaderBorderBrush}" BorderThickness="1">
                    <Grid>
                      <Grid x:Name="HeaderElem" Background="{StaticResource TransparentBrush}">
                        <TextBlock Margin="10,6,33,0" VerticalAlignment="Center" Foreground="{StaticResource LightForegroundBrush}" Text="{Binding DialogCaption, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource TextBlockStyle}" />
                      </Grid>
                    </Grid>
                  </Border>
                  <Grid Grid.Row="1" Margin="{TemplateBinding Padding}">
                    <igPrimBase:AdvancedColorShadePicker CurrentColor="{Binding Path=ColorPicker.SelectedColorPreview, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay }"
                                                         SelectedColor="{Binding ColorPicker.SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                  </Grid>
                </Grid>
              </Border>
            </Popup>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igPrimBase:ColorPickerDialog" BasedOn="{StaticResource ColorPickerDialogStyle}" />

  <!-- *********************************  TransparencyBackgroundControl Style  ********************************* -->
  <Style TargetType="igPrim:TransparencyBackgroundControl">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrim:TransparencyBackgroundControl">
          <Grid x:Name="Root" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>